package 模拟读写数据;

/**
 * @ClassName: BusinessC
 * @Auther: Drawin
 * @Date: 2021/10/18 17:20
 * @Description:
 */

public class BusinessC {
    private IReadSaveData iReadSaveData;
    public IReadSaveData getiReadSaveData(){
        return iReadSaveData;
    }
    public void setiReadSaveData(IReadSaveData iReadSaveData){
        this.iReadSaveData=iReadSaveData;
    }
    public BusinessC(IReadSaveData iReadSaveData){
        this.iReadSaveData=iReadSaveData;
    }
    //业务方法，保存数据，保存到哪里有实际的对象ireadsavedata决定
    public void savaData(String data){
        iReadSaveData.saveData(data);
    }
    //业务方法，读取数据，从哪里读取由实际的对象ireadsavedata决定
    public String readData(){
        return iReadSaveData.getData();
    }

}
